<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>用友在线运维</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta name="format-detection" content="telephone=no">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <link rel="alternate icon" type="image/png" href="static/i/favicon.png">

    <script src="static/sool/js/global.js"></script>
    <script>
        JsAndCssUtil.importCss("/static/css/amazeui.min");
        JsAndCssUtil.importCss("/static/sool/style/commitQuestion");
        JsAndCssUtil.importCss("/static/sool/style/basic");
        JsAndCssUtil.importCss("/static/css/font-awesome");
        JsAndCssUtil.importCss("/static/css/font-glyphicons");
        JsAndCssUtil.importCss("/static/sool/umeditor/themes/default/css/umeditor");
        JsAndCssUtil.importCss("/static/sool/uploadify/uploadify");
    </script>
</head>
<body>

<!--头部logo与我要提问的显示-->
<div id="ContainerId">
    <script type="text/javascript">
        renderNavBar();
    </script>
</div>

<!--内容展现区域-->
<div class="show">
    <div class="show-article">
        <h2>标题:&nbsp;&nbsp;
            <span id="showQuestionTitle"></span>
        </h2>
    </div>
    <div>
        <p>

        <h2>描述:</h2>
        <div id="showQuestionContext"></div>
        </p>
    </div>

    <hr>
    <div id="oldfilenamesuccess"></div>
    <div class="am-text-right am-margin-right-lg">
        <a href="#">
            <button id="updateQuestion" class="am-btn am-btn-primary" >
                修改问题
            </button>
        </a>
    </div>
</div>

<!--内容编辑区-->
<div class="context">
    <div class="am-g am-container">
        <form id="context_editor" class="am-form" method="post">
            <label for="name" class="about-color">
                <span class="fa-stack fa-lg doc-friend-icon1">
                    <i class="fa fa-square-o fa-stack-2x"></i>
                    <i class="fa fa-twitter fa-stack-1x"></i>
                </span>
                一句话描述您的疑问？？
                <span><code>2547</code>位顾问 <code>12797373</code>位知友为您在线解答</span>
            </label>
            <input id="name" name="question_title" type="text" placeholder="请输入您的问题" onblur="title_length();">
            <span id="showMessage" class="showMessage">亲，您只可以输入25个字哦！</span>
            <br/>

            <input id="old_fileName" name="old_fileName" type="hidden">
            <input id="new_file_url" name="new_file_url" type="hidden">
            <label class="about-color">
                <span class="fa-stack fa-lg doc-friend-icon2">
                  <i class="fa fa-circle fa-stack-2x"></i>
                  <i class="fa fa-flag fa-stack-1x fa-inverse"></i>
                </span>
                问题的描述
            </label>

            <div class="doc-editor-location">
                <script type="text/plain" id="contentEditor" name="description"  style="width:100%;height:240px;"></script>
            </div>
            <div>
                <div id="queue"></div>
                <span style="float: left;"><input id="file_upload" name="file_upload" type="file"></span>
                <div class="doc-a-location">
                    <span class="doc-up-location" ><a href="javascript:$('#file_upload').uploadify('upload','*')">上传</a></span>
                    <span class="doc-clone-location"><a href="javascript:$('#file_upload').uploadify('cancel')">取消</a></span>
                </div>
                <div class="doc-show-location" id="oldfilename"></div>

                <div class="doc-button-location" style="float: right;">
                    <button style="float: left;" id="commitQuestion" type="submit" class="am-btn am-btn-primary am-btn-md doc-commit-location">
                        <i class="am-icon-check"></i>
                        提交问题
                        </button>
                </div>
            </div>
        </form>
    </div>
</div>

<!--修改补充问题的弹框-->
<!--覆盖框-->
<div id="covered">

</div>
<!--弹出框-->
<div class="am-g am-container updataMessage" id="poplayer">
    <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">

        <div class="am-u-lg-10">
            <h3 class="am-margin-top-2"><a>为了尽快帮助您解决问题，请填写下面信息</a></h3>
            <hr>
        </div>

        <div class="am-u-lg-2">
            <button class="doc-color-location doc-close">
                <span class="am-close am-icon-times"></span>
            </button>
        </div>
        <div class="am-u-lg-12">
            <div class="am-input-group am-input-group-default">
                <span class="am-input-group-label"><i class="am-icon-user"></i></span>
                <input id="user-name" type="text" class="am-form-field" placeholder="请输入您的姓名">
            </div>
            <div id="usename_info" style="color: red; margin-left: 50px; display: none">请输入提示信息</div>
            <br>
            <div class="am-input-group am-input-group-default">
                <span class="am-input-group-label">
                    <i class="am-icon-phone"></i>
                </span>
                <input id="user-phone" type="text" class="am-form-field" placeholder="请输入您的电话号码">
            </div>
            <div id="user-phone_info" style="color: red; margin-left: 50px; display: none;">请输入提示信息</div>
            <br>
            <div class="am-input-group am-input-group-default">
                <span class="am-input-group-label">
                    <i class="am-icon-envelope"></i>
                </span>
                <input id="user-email" type="text" class="am-form-field" placeholder="请输入您的电子邮箱">
            </div>
            <div id="user-email_info" style="color: red; margin-left: 50px; display: none">请输入提示信息</div>
            <hr>
            <button id="saveInfo" type="button" class="am-btn am-btn-success doc-saveInfo">保存信息</button>
            <p></p>
            <p></p>
        </div>
    </div>
</div>

<!--底部的显示-->
<footer class="am-margin-top doc-footer-color">
    <hr/>
    <p class="am-text-center">
        <small>
            @copy;2015用友能源科技有限公司版权所有 京ICP备15038140号-1 官方微博 用户协议
        </small>
    </p>
</footer>

<script type="text/javascript">
    JsAndCssUtil.importJs("/static/sool/js/jquery");
    JsAndCssUtil.importJs("/static/js/amazeui.min");
    JsAndCssUtil.importJs("/static/js/handlebars.min");

    /*导航条样式选定的控制*/
    JsAndCssUtil.importJs("/static/sool/js/nav");

    /*加载引入公共的useID的文件*/
    JsAndCssUtil.importJs("/static/sool/data/bindingData");
    JsAndCssUtil.importJs("/static/sool/data/commitQuestion");

    <!--引入UEeditor网络编辑器-->
    JsAndCssUtil.importJs("/static/sool/umeditor/umeditor.min");
    JsAndCssUtil.importJs("/static/sool/umeditor/lang/zh-cn/zh-cn");
    JsAndCssUtil.importJs("/static/sool/umeditor/publish.umeditor.config");
    <!--导入-->
    JsAndCssUtil.importJs("/static/sool/uploadify/jquery.uploadify.min");
    JsAndCssUtil.importJs("/static/sool/uploadify/uploadfile");
    /*点击提交显示按钮提交数据*/
    JsAndCssUtil.importJs("/static/sool/js/jquery.form");
</script>

<!--[if lt IE 9]>
<script>
    JsAndCssUtil.importJs("/static/js/modernizr-2010.07.16dev");
    JsAndCssUtil.importJs("/static/js/amazeui.ie8polyfill.min");
</script>
<![endif]-->

<script type="text/javascript">
    var contentEditorUM = UM.getEditor('contentEditor');
</script>


<!--点击提交问题显示问题的展示区域
    点击修改问题显示问题的编辑区域
-->
<script>
    $(document).ready(function () {
        searchClick();
        navBarStyle();
		/*点击关闭按钮关闭弹框*/
        $("#poplayer").on("click",".doc-close",function(){
            $("#poplayer").hide();
            $("#covered").hide();
            return false;
        });
        if(getUrlParam("pk_question") == null){
            /*提出问题的过程(插入问题)*/
            showQuestion();
        }else{
            selectQuestion(getUrlParam("pk_question"));
            /*其他页面条状修改*/
            $(".context").on("click","#commitQuestion",function(){
                otherUpdateQuestion(getUrlParam("pk_question"));
            });
        }
        /*修改问题的过程*/
      //  clickUpdataQuestion();//点击本页面修改
        $(".show").on("click","#updateQuestion",function(){
            var pk_question = $("#showQuestionTitle").data("pk_question");
            WebSite.debug("编辑修改页面的问题的pk"+pk_question);
            selectQuestion(pk_question);
            otherUpdateQuestion(pk_question);
        });

		/*点击保存信息触发*/
        $("#poplayer").on("click","#saveInfo",function(){
            /*邮箱的合法验证*/
            var email_reg = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
            var email_val = $("#user-email").val().trim();
            /*判断用户名合法*/
            if($("#user-name").val().trim() == ""){
                $("#usename_info").show();
                $("#usename_info").text("用户名不能为空");
                return false;
            }else
            /*判断电话号码*/
            if($("#user-phone").val().trim() == ""){
                $("#user-phone_info").show();
                $("#user-phone_info").text("电话号码不能为空");
                return false;
            }
            /*判断电子邮件*/
            if($("#user-email").val().trim() == ""){
                $("#user-email_info").show();
                $("#user-email_info").text("电子邮件不能为空");
                return false;
            }else if(email_reg.test(email_val) == false){
                $("#user-email_info").show();
                $("#user-email_info").text("邮箱格式不正确");
                return false;
            }

            /*验证用户信息提交*/
            updataUserInfo();
        });
    });
</script>




</body>
</html>
